package com.cxd.springcloud.controler;

import com.cxd.springcloud.feign.PaymentFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerPaymentController {

    @Autowired
    private PaymentFeign paymentFeign;

    @GetMapping("/consumer/payment/circuit/{id}")
    public String paymentCircuitBreaker(@PathVariable("id") Integer id) {

        return paymentFeign.paymentCircuitBreaker(id);
    }

}
